﻿using System;
using System.Collections.Generic;

namespace ProjectIndieFarm
{
    public class PowerUpGroupPlantAction
    {
        public static void Setup(IPowerUpSystem system)
        {
            var plantAction1 = system.Add(new PowerUp()
                .SetKey("plant_action_1")
                .SetTitle("工具强化Lv1")
                .SetDescription("减少种植时使用工具消耗的时间 工具作用范围+1")
                .SetPrice(600)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV1_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV1_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV1_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV1_TOOL_HOUR_COST_WATER_POT;

                    Global.PlantActionRange++;

                    self.SendMessageWithEffect("减少工具所花费时间 作用范围+1");
                }));
            var plantAction2 = system.Add(new PowerUp()
                .SetKey("plant_action_2")
                .SetTitle("工具强化Lv2")
                .SetDescription("减少种植时使用工具消耗的时间")
                .SetPrice(750)
                .ShowCondition(_ => plantAction1.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV2_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV2_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV2_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV2_TOOL_HOUR_COST_WATER_POT;

                    self.SendMessageWithEffect("减少工具所花费时间");
                }));
            var plantAction3 = system.Add(new PowerUp()
                .SetKey("plant_action_3")
                .SetTitle("工具强化Lv3")
                .SetDescription("减少种植时使用工具消耗的时间 工具作用范围+1")
                .SetPrice(1000)
                .ShowCondition(_ => plantAction2.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV3_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV3_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV3_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV3_TOOL_HOUR_COST_WATER_POT;

                    Global.PlantActionRange++;

                    self.SendMessageWithEffect("减少工具所花费时间 作用范围+1");
                }));
            var plantAction4 = system.Add(new PowerUp()
                .SetKey("plant_action_4")
                .SetTitle("工具强化Lv4")
                .SetDescription("减少种植时使用工具消耗的时间")
                .SetPrice(1200)
                .ShowCondition(_ => plantAction3.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV4_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV4_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV4_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV4_TOOL_HOUR_COST_WATER_POT;

                    self.SendMessageWithEffect("减少工具所花费时间");
                }));
            var plantAction5 = system.Add(new PowerUp()
                .SetKey("plant_action_5")
                .SetTitle("工具强化Lv5")
                .SetDescription("减少种植时使用工具消耗的时间 工具作用范围+1")
                .SetPrice(1500)
                .ShowCondition(_ => plantAction4.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV5_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV5_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV5_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV5_TOOL_HOUR_COST_WATER_POT;

                    Global.PlantActionRange++;

                    self.SendMessageWithEffect("减少工具所花费时间 作用范围+1");
                }));
            var plantAction6 = system.Add(new PowerUp()
                .SetKey("plant_action_6")
                .SetTitle("工具强化Lv6")
                .SetDescription("减少种植时使用工具消耗的时间")
                .SetPrice(1800)
                .ShowCondition(_ => plantAction5.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV6_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV6_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV6_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV6_TOOL_HOUR_COST_WATER_POT;

                    self.SendMessageWithEffect("减少工具所花费时间");
                }));
            var plantAction7 = system.Add(new PowerUp()
                .SetKey("plant_action_7")
                .SetTitle("工具强化Lv7")
                .SetDescription("减少种植时使用工具消耗的时间 工具作用范围+1")
                .SetPrice(2400)
                .ShowCondition(_ => plantAction6.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV7_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV7_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV7_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV7_TOOL_HOUR_COST_WATER_POT;

                    Global.PlantActionRange++;

                    self.SendMessageWithEffect("减少工具所花费时间 作用范围+1");
                }));
            var plantAction8 = system.Add(new PowerUp()
                .SetKey("plant_action_8")
                .SetTitle("工具强化Lv8")
                .SetDescription("减少种植时使用工具消耗的时间")
                .SetPrice(2800)
                .ShowCondition(_ => plantAction7.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV8_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV8_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV8_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV8_TOOL_HOUR_COST_WATER_POT;

                    self.SendMessageWithEffect("减少工具所花费时间");
                }));
            var plantAction9 = system.Add(new PowerUp()
                .SetKey("plant_action_9")
                .SetTitle("工具强化Lv9")
                .SetDescription("减少种植时使用工具消耗的时间 工具作用范围+1")
                .SetPrice(3400)
                .ShowCondition(_ => plantAction8.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV9_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV9_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV9_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV9_TOOL_HOUR_COST_WATER_POT;

                    Global.PlantActionRange++;

                    self.SendMessageWithEffect("减少工具所花费时间 作用范围+1");
                }));
            var plantAction10 = system.Add(new PowerUp()
                .SetKey("plant_action_10")
                .SetTitle("工具强化Lv10")
                .SetDescription("减少种植时使用工具消耗的时间")
                .SetPrice(4000)
                .ShowCondition(_ => plantAction9.Unlocked)
                .OnUnlock(self =>
                {
                    Global.ToolHourCostHand = Config.LV10_TOOL_HOUR_COST_HAND;
                    Global.ToolHourCostHoe = Config.LV10_TOOL_HOUR_COST_HOE;
                    Global.ToolHourCostSeed = Config.LV10_TOOL_HOUR_COST_SEED;
                    Global.ToolHourCostWaterPot = Config.LV10_TOOL_HOUR_COST_WATER_POT;

                    self.SendMessageWithEffect("减少工具所花费时间");
                }));

        }
    }
}
